﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace CPPEI.Coolzon.UI.Script
{
    /// <summary>
    /// 用于供脚本访问组件的类
    /// </summary>
    public class ArcGisScriptObject
    {
        public ArcGisScriptObject()
        {
            
        }

        public string GisData { get; set; }


        public double ZoomLevel { get; set; }


        public string Selected { get; set; }


        public string MapPoint { get; set; }


        public string Envelop { get; set; }


        public string LayerId { get; set; }

        public void OnSymbolSelected(string arcgisDic,double zoom,string selected,string layerId,string mapPoint)
        { 
            ZoomLevel = zoom;
            GisData = arcgisDic;
            Selected = selected;
            LayerId = layerId;
            MapPoint = mapPoint;
        }
        //脚本实例
        //function test(data)
        //{ 
        //result=eval('(' + data + ')');
        //person.Name=result['name'];
        //}";
        public void OnLocationResolution(string mapPoint)
        {
            MapPoint = mapPoint;
        }
        public void OnExtendChanged(string envelope,double level)
        {
            Envelop = envelope;
            ZoomLevel = level;
        }
    }
}
